Auto merge of #4000 - jonhoo:only-incremental-on-nightly, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 7 May 2017 16:24:48 +0000 (16:24 +0000)
committerbors <bors@rust-lang.org>
Sun, 7 May 2017 16:24:48 +0000 (16:24 +0000)
Only pass -Zincremental to nightly rustc.

`-Z` can only be used on nightly builds; other builds complain loudly. Since incremental builds only work on nightly anyway, we should silently ignore `CARGO_INCREMENTAL` on anything but nightly. This allows users to always have `CARGO_INCREMENTAL` set without getting unexpected errors on stable/beta builds.

Fixes #3835.


Trivial merge